package io.github.codergjw.utils;import java.net.InetAddress;import java.net.UnknownHostException;/** * @ClassName: IpUtils * @Author: 小飞 * @Date: 2023/5/9 18:18 * @Description: 获取IP的工具类 */public class IpUtils {    /**     * 获取IP     * @return     */    public static String getLocalIp() {        try {            return InetAddress.getLocalHost().getHostAddress();        } catch (UnknownHostException e) {            e.printStackTrace();            return null;        }    }}